<?php

namespace addons\qingdong\validate;

use think\Validate;

class Consume extends Validate {
	/**
	 * 验证规则
	 */
	protected $rule = [
		'customer_id'   => 'require|number',
		'consume_type'  => 'max:64',
		'consume_time'  => 'date',
		'money'         => 'number',
		'check_status'  => 'number|between:0,5',
		'remark'        => 'max:250',
	];
	/**
	 * 提示消息
	 */
	protected $message = [];
	/**
	 * 字段描述
	 */
	protected $field = [
		'customer_id'   => '客户',
		'consume_type'  => '消费方式',
		'consume_time'  => '消费日期',
		'money'         => '消费金额',
		'check_status'  => '审核状态',
		'remark'        => '备注',
	];
	/**
	 * 验证场景
	 */
	protected $scene = [
		'create' => ['customer_id', 'consume_type', 'consume_time', 'money', 'check_status', 'remark'],
		'edit'   => [],
	];
}
